package com.cityp.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Timestamp;
import java.util.List;

@Data
@ApiModel(value = "答题记录对象",description = "")
public class Quiz {
    @ApiModelProperty(value = "")
    @TableId(value = "quiz_id", type = IdType.AUTO)
    private long quizId;

    @ApiModelProperty(value = "")
    @JsonIgnore
    private String quizUserId;

    @ApiModelProperty(value = "答题耗时,格式为'xxminxxs'",required = true)
    private String quizUseTime;

    @ApiModelProperty(value = "答题时间，后端获取，不用填")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Timestamp quizTime;

    @ApiModelProperty(value = "答题成绩",required = true)
    private int quizScore;

    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "答题明细",required = true)
    private List<QuizInfo> quizInfoList;
}
